﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Helper.FullTextIndex;

namespace TI_EntityLib.TiEntityObjects.Clifar
{
  /// <summary>
  /// торговые наименования деревом
  /// </summary>  
    public class DrugDictionaryRecord : IFullindexObject 
  {
      public string ID { get; set; }      
      public string InnNx { get; set; }
      public string TradeNmNx { get; set; }
      public string PhGrR { get; set; }              
      public string InnR { get; set; }
      public string InnE { get; set; }
      public string TradeNmR { get; set; }
      public string TradeNmE { get; set; }
      public string DrugFmNmR { get; set; }

      public override string ToString()
      {
          return Helper.Json<DrugDictionaryRecord>.NewtonSerializeObject(this);
      }

      public string ValueInfo
      {
          get { return InnR; }
      }

      public int LengthRank
      {
          get { return Terms.Count; }
      }

      public List<string> Terms
      {
          get
          {
              List<string> l1 = RamEngine.ParseText(InnR);
              List<string> l2 = RamEngine.ParseText(InnE);
              List<string> l3 = RamEngine.ParseText(TradeNmR);
              List<string> l4 = RamEngine.ParseText(TradeNmE);
              l1.AddRange(l2);
              l1.AddRange(l3);
              l1.AddRange(l4);
              return l1;
          }
      }
      
  }
}
